package fr.cnam.projetSiw.client.structure.pages.description;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.AcceptsOneWidget;

import fr.cnam.projetSiw.client.core.ClientFactory;
import fr.cnam.projetSiw.client.core.ContextKeeper;
import fr.cnam.projetSiw.client.core.GeolocationManager;
import fr.cnam.projetSiw.client.core.ZicActivity;
import fr.cnam.projetSiw.shared.MusicEvent;

public class DescEventActivity extends ZicActivity implements DescEventView.Presenter
{
	private MusicEvent event = null;


	public DescEventActivity(ClientFactory clientFactory)
	{
		super(clientFactory);

	}

	@Override
	public void start(AcceptsOneWidget panel, EventBus eventBus)
	{
		final DescEventView view = clientFactory.getDescEventView();
		view.setPresenter(this);
		panel.setWidget(view);

		GeolocationManager manager = GeolocationManager.getInstance();
		
		event = ContextKeeper.getInstance().getEvent();
		if (event != null)
			view.setData(event);
	}
}
